<div class="table-responsive" style="overflow-x: visible;">
    <table class="table table-bordered table-hover">
        <tbody>
        <tr>
            <th class="hidden-xs">
                <label><input onchange="checkAll()" type="checkbox" value=""></label>
            </th>
            <th>ID</th>
            <th>标题</th>
            <th>类型</th>
            <th>链接</th>
            <th>封面图片</th>
            <th>作者</th>
            <th>排序</th>
            <th>状态</th>
            <th>更新时间</th>
            <th>操作</th>
        </tr>

        {% for item in records %}
        <tr>
            <td class="hidden-xs">
                <label><input name="checkbox" class="check" type="checkbox" value="{{item._id}}"></label>
            </td>
            <td>{{item._id}}</td>
            <td>{{item.title}}</td>
            <td>
                {% if articleType == '0' %}最新资讯{% endif %}
                {% if articleType == '1' %}推荐阅读{% endif %}
                {% if articleType == '2' %}今日头条{% endif %}
                {% if articleType == '3' %}电商经验谈{% endif %}
            </td>
            <td>
                <div class="btn-group" style="margin: 0px">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        链接<span class="caret"></span></button>
                    <div class="dropdown-menu" style="padding: 10px;max-width: none;">
                        /cms/article/{{item.pinyin}}
                    </div>
                </div>
            </td>
            <td>
                <div class="btn-group" style="margin: 0px">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        图片<span class="caret"></span></button>
                    <div class="dropdown-menu">
                        <img style="height: 200px"
                             src="{{item.cover.url}}" onerror="src='/public/noimage.gif'"/>
                    </div>
                </div>
            </td>
            <td>
                {{item.author}}
            </td>
            <td>
                {{item.rank}}
            </td>
            <td>
                {% if item.status %}
                <button onclick="javascript:disableItem('{{item._id}}')" class="btn btn-success"><span class="glyphicon glyphicon-ok"/> </button>
                {% else %}
                <button onclick="javascript:enableItem('{{item._id}}')" class="btn btn-danger" ><span class="glyphicon glyphicon-remove"/></button>
                {% endif %}
            </td>
            <td>{{item.updatedAt | date('YYYY-MM-DD HH:mm:ss') }}</td>
            <td class="table-action">
                <a href="/admin/article/add?id={{item._id}}">编辑</a>
                <button onclick="javascript:deleteItem('{{item._id}}')" class="btn btn-danger" >删除</button>
            </td>
        </tr>
        {% endfor %}

        </tbody>
    </table>
    <div class="box-footer no-padding">
        <div class="mailbox-controls">
            <div class="pull-right">
                {{ pager| safe }}
            </div>
        </div>
    </div>
</div>